solve_bfgs Function

public function solve_bfgs(fcn, xo, args) result(x)

Utilizes the BFGS method for minimizing a function of N variables. For more control over the solver it is recommended to utilize the bfgs type. This function is a convenience wrapper around this solver.

Arguments

Type IntentOptional Attributes Name
procedure(scalar_function) :: fcn

The function.

real(kind=real64), intent(in), dimension(:) :: xo

An N-element array containing an initial guess at the solution.

class(*), intent(in), optional :: args

An optional object that can be used to pass information to fcn.

Return Value real(kind=real64), allocatable, dimension(:)

An N-element array containing the values of that minimize within the default solver tolerances.